package com.example.controller;

import com.example.rabbitmq.topic.service.TopicSendMsgService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther:
 * @Description:
 * @Date: 2019/12/27 12:59
 */
@RestController
@RequestMapping("/TopicSend")
@Api(value = "TopicSendController", description = "TopicSendController")
public class TopicSendController {

    @Autowired
    private TopicSendMsgService topicSendMsgService;

    @PostMapping("/topicSendMan")
    @ApiOperation(value = "发送SendMan消息", notes = "发送SendMan消息")
    public String topicSendMan(String message) {
        String sendMsg = topicSendMsgService.topicSendMan(message);
        return sendMsg;
    }

    @PostMapping("/topicSendWoman")
    @ApiOperation(value = "发送SendWoman消息", notes = "发送SendWoman消息")
    public String topicSendWoman(String message) {
        String sendMsg = topicSendMsgService.topicSendWoman(message);
        return sendMsg;
    }

    @PostMapping("/topicSendAll")
    @ApiOperation(value = "发送SendAll消息", notes = "发送SendAll消息")
    public String topicSendAll(String message) {
        String sendMsg = topicSendMsgService.topicSendAll(message);
        return sendMsg;
    }
}
